package cn.tedu.ivos.base.response;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author liyuehui
 * @time 2024/7/3 16:36
 */

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum StatusCode {
    //状态码、状态码描述
    SUCCESS(2000, "OK"),
    LOGIN_SUCCESS(2001, "登录成功"),
    OPERATION_SUCCESS(2002, "操作成功"),


    NOT_LOGIN(4000, "未登录"),
    // 出于安全的考虑,不会提示用户名还是密码错误,但是状态码不一样
    PASSWORD_ERROR(4002, "用户名或密码错误"),
    USERNAME_ERROR(4003, "用户名或密码错误"),

    OPERATION_FAILED(5001, "操作失败"),
    VALIDATE_ERROR(5002, "请求参数错误"),
    USERNAME_ALREADY_EXISTS(5003, "用户名被占用"),
    DATA_UNEXISTS(5004, "请求数据不存在"),
    LICENSE_ALREADY_EXISTS(5005, "车牌号被占用"),
    GEOFENCE_HAS_BIND_VEHICLE(5006, "围栏中有绑定车辆,请解除绑定后再删除"),
    DICT_CODE_ALREADY_EXISTS(5007, "字典编码已存在"),
    DICT_CODE_IS_EMPTY(5008, "请输入字典编码"),
    DICT_NAME_IS_EMPTY(5009, "请输入字典名称"),
    DICT_CODE_IS_NOT_EXISTS(5010, "字典编码不存在"),
    DICT_OPTION_VALUE_ALREADY_EXISTS(5011, "字典项值已存在"),
    DICT_OPTION_NOT_EXISTS(5012, "字典项不存在"),

    UNKNOWN_ERROR(9000, "未知错误");

    /**
     * 状态码、状态码描述
     */
    private Integer code;
    private String msg;
}
